#ifndef HASHTABLE_H
#define HASHTABLE_H

#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>

typedef struct
{
  char** keyArray;
  void** dataArray;
  int size;
  int nbItem;
} hashtable;

hashtable* createTable(int size);
void freeTable(hashtable* table);

void* getData(char* key, hashtable* table);
char* getKey(void* data, hashtable* table);
int existKey(char* key, hashtable* table);

void addData(char* key, void* data, hashtable* table);

#endif // HASHTABLE_H
